<div class="panel-base panel-admin">
		
		<div class="row-fluid">
			<div class="span8">			
				<h1>Payment Order</h1>
				<p>รายการสั่งซื้อใหม่ทั้งหมด</p>
			</div>
			<div class="span4">
				<form class="form-search">
				  <input type="text" class="input-medium search-query">
				  <button type="submit" class="btn">Search</button>
				</form>
			</div>
		</div>
		<div class="panel-admin-inner">					
			<table class="table table-hover table-cafe">
				<thead>
					<tr>
						<th style="width:60%;"></th>
						<th style="width:10%;">วันที่สั่งซื้อ</th>
						<th style="width:10%;">วันที่หมดอายุ</th>
						<th style="width:10%;">จำนวนวันที่เหลือ</th>						
						<th style="width:15%;"></th>
					</tr>
				</thead>
				<tbody>			
					<?php
						if (count($payment_order_list) > 0){
							for ($i=0; $i<count($payment_order_list); $i++){ ?>
							
								<?php if ($payment_order_list[$i]['PAK_O_STATUS'] == 1):?>
								<tr class="success">
								<?php else: ?>
								<tr class="error">
								<?php endif; ?>
									<td><?php print $payment_order_list[$i]['PAK_O_CODE']; ?></td>
									<td><?php print $payment_order_list[$i]['PAK_O_DATE']; ?></td>
									<td><img class="span1 img-rounded" src="<?php print $payment_order_list[$i]['CAF_IMG_L_FILENAME']; ?>" /></td>
									<td><?php print $payment_order_list[$i]['CAF_TITLE']; ?></td>
									<td><?php print $payment_order_list[$i]['PAK_NAME']; ?></td>
									<td>
										<div class="btn-group">
											<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
							                <ul class="dropdown-menu">
							                	<li><a href="<?php print base_url() . 'admin/order/payment/view?o=' . $payment_order_list[$i]['PAK_O_CODE']; ?>">รายละเอียด</a></li>							                						                  
											</ul>
										</div>
									</td> 
								</tr>							
							<?php }
						} 
					?>
				</tbody>
			</table>	
		</div>
		<div>
			<div class="pagination">
			  <ul>
			    <li><a href="<?php print base_url() . 'admin/order/payment?p=1'; ?>">First</a></li>    
			    <?php for ($i=0; $i<$page_count; $i++) {?>
			      	<li><a href="<?php print base_url() . 'admin/order/payment?p=' . ($i+1); ?>"><?php print $i+1; ?></a></li>
			    <?php }?>
			    <li><a href="<?php print base_url() . 'admin/order/payment?p=' . $page_count; ?>">Last</a></li>
			  </ul>
			</div>
		</div>
	
</div>